from Base import message, intersect, SS_VALID
from DRG import MDCG_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["29.3201","29.5302","31.7301","31.9500","31.9501","40.5902","42.0100","42.0900x001","42.0900x002","42.0901","42.0902","42.1000","42.1100","42.1200","42.1901","42.2100","42.2200","42.2500","42.3100x001","42.3101","42.3200x003","42.3200x006","42.3201","42.3300x015","42.3300x016","42.3300x017","42.3900","42.7x00x001","42.7x01","42.7x02","42.7x04","42.8100","42.8200","42.8300","42.8400","42.8501","42.8502","42.8600","42.8701","42.8900","42.9100x002","44.4400x001","44.6500x001","44.6500x002","44.9100x002"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合GC1入组条件，匹配规则：主手术匹配')

    if MDCG_DRG.GC19_group(record):
      return 'GC19'
        
    return 'GC1'
  else:
    return ''
    
